package com.maserb.monitor.service.base;

import org.springframework.data.repository.CrudRepository;

import java.io.Serializable;
import java.util.List;

/**
 * Crud服务接口
 */
public interface CrudService<Rep extends CrudRepository<T, ID>, T, ID extends Serializable> {
    <S extends T> S save(S var1);

    <S extends T> Iterable<S> save(Iterable<S> var1);

    T findOne(ID var1);

    boolean exists(ID var1);

    List<T> findAll();

    long count();

    void delete(ID var1);

    void delete(T var1);

    void delete(Iterable<? extends T> var1);

    void deleteAll();

    void deleteAllByKeys(Iterable<? extends ID> var1);
}
